package cn.com.wangluotongxin.mall.controller;

import cn.com.wangluotongxin.common.web.AjaxResult;
import cn.com.wangluotongxin.db.pojo.PageData;
import cn.com.wangluotongxin.mall.dto.GoodsMxDto;
import cn.com.wangluotongxin.mall.service.IMallGoodsMxService;
import cn.com.wangluotongxin.mall.vo.GoodsMxVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 网络通信-商城APP-商品明细 前端控制器
 * </p>
 *
 * @author AutoGenerator
 * @since 2024-11-05
 */
@Api(tags = "网络通信-商城APP-商品明细 相关接口")
@RestController
@RequestMapping("/goods/mx")
public class MallGoodsMxController {

    @Autowired
    private IMallGoodsMxService goodsMxService;

    @ApiOperation("分页")
    @GetMapping("/page")
    public AjaxResult<PageData<GoodsMxVo>> getPage(
            GoodsMxDto dto) {
        IPage<GoodsMxVo> page = goodsMxService.getPage(dto);
        return AjaxResult.success(PageData.build(page));
    }
}